<template>
	<view class="mine">

		<view class="mine-header">
			<u-avatar :src="src"></u-avatar>
			<u-button text="点击登录" class="button" @click="login"></u-button>
		</view>

		<view class="">
			<view>
				<u-grid :border="false" col="4">
					<u-grid-item v-for="(baseListItem,baseListIndex) in baseList" :key="baseListIndex">
						<u-icon :customStyle="{paddingTop:20+'rpx'}" :name="baseListItem.name" :size="22"></u-icon>
						<text class="grid-text">{{baseListItem.title}}</text>
					</u-grid-item>
				</u-grid>
				<u-toast ref="uToast" />
			</view>
		</view>

		<view class="">
			<u-cell-group v-for="item in listData" :key="item">
				<u-cell :icon="item.icon" :title="item.title" :isLink="item.isLink"
					@click="open(item)"
					:url="item.url" arrow-direction="down"></u-cell>
				<!-- 	<u-cell icon="star" title="关注服务号" :isLink="false" isLink></u-cell>
				<u-cell icon="account-fill" title="加入贝壳" :isLink="false" isLink></u-cell>
				<u-cell icon="bell" title="隐私政策" :isLink="false" isLink></u-cell> -->
				<!-- <u-popup :show="show" @close="close" @open="open">
				            <view>
				                <text>出淤泥而不染，濯清涟而不妖</text>
				            </view>
							as2
							s start
							
							as start
							as end
							
							s end
							
							settimeout
							
							p1
							p2
						</u-popup> -->
			</u-cell-group>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src: 'https://cdn.uviewui.com/uview/album/1.jpg',

				baseList: [{
						name: 'photo',
						title: '订阅'
					},
					{
						name: 'lock',
						title: '关注'
					},
					{
						name: 'star',
						title: '浏览'
					},
					{
						name: 'star',
						title: '看房管理'
					},
				],
				listData: [{
						icon: "share",
						title: "我的钱包",
						url: "",
						isLink: true,
						value:""
					},
					{
						icon: "star",
						title: "关注服务号",
						isLink: true,
						value: "查询",
						url: "/pages/follow/follow"
					},
					{
						icon: "kefu-ermai",
						title: "客服电话",
						
						value: "10086",
						isLink: true,
						url: "",
						show: false,
					},
					{
						icon: "map",
						title: "关于我们",
						isLink: true,
						url: "/pages/about/about",
						value:""
					},
					{
						icon: "account-fill",
						title: "加入贝壳",
						isLink: true,
						url: "/pages/join/join",
						value:""
					},
					{
						icon: "bell",
						title: "隐私政策",
						isLink: true,
						url: "/pages/privacy/privacy",
						value:""
					},
				]
			};
		},
		methods: {
			open(item) { 
				if(item.show!=false){
					return
				}else{
					uni.makePhoneCall({
						phoneNumber:"10086"
					})
				}
				
			},
			close() {
				
				this.listData.show = false
				// console.log('close');
			},
			login() {
				uni.getUserInfo({
					desc: "获取您的信息",
					success(res) {
						console.log(res);
					}
				})
			}
		}

	}
</script>

<style lang="scss">
	.mine-header {
		background-color: #507ff2;
		height: 100px;
		display: flex;
		justify-content: flex-start;
		align-items: center;

		.u-avatar {
			margin-left: 10%;
		}

		.u-button {
			font-weight: bold;
		}
	}

	.u-button.data-v-3bf2dba7 {
		width: 40% !important;
	}

	.grid-text {
		font-size: 14px;
		color: #909399;
		padding: 10rpx 0 20rpx 0rpx;
		/* #ifndef APP-PLUS */
		box-sizing: border-box;
		/* #endif */
	}
</style>
